home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
dev_libs
/
feelin040718
/
demos
/
dragdrop.e
< prev
next >
Wrap
Text File
|
2004-08-03
|
2KB
|
76 lines
OPT PREPROCESS
MODULE 'feelin','libraries/feelin','a4',
'intuition/intuition',
'graphics/rastport','graphics/gfxmacros','graphics/regions'
PROC main()
DEF fcc:PTR TO feelinClass,
app,win
sys_SGlob()
IF feelinbase := OpenLibrary('feelin.library',FV_VERSION)
IF fcc := F_CreateClassA([FA_Class_SuperName, FC_Text,
FA_Class_Dispatcher, {myDispatcher},
TAG_DONE])
app := AppObject,
Child, win := WindowObject,
FA_Window_Title, 'Feelin : Drag\an\aDrop',
FA_Window_Open, TRUE,
Child, HGroup,
Child, TextObject,
FA_Frame, 'FP_Button_Frame',
FA_Back, 'FP_Button_Back',
InputRelease, FA_UserData,'Pouic Pouic\n',
FA_Draggable,TRUE, FA_Font,'FP_Font_Big',
FA_Text, 'Drag Me',
FA_Text_VCenter, TRUE,
FA_Text_HCenter, TRUE,
End,
Child, F_NewObjA(fcc.name,[
FA_Back, 'FP_Text_Back',
FA_Frame, 'FP_Text_frame',
FA_Font, 'FP_Font_Big',
FA_Dropable, TRUE,
FA_Text, 'Drop on Me',
FA_Text_VCenter, TRUE,
FA_Text_HCenter, TRUE,
End,
End,
End,
End
IF app
F_DoA(win,FM_Notify,[FA_Window_CloseRequest,TRUE, app, FM_Application_Shutdown,0]);
F_DoA(app,FM_Application_Run,NIL)
F_DisposeObj(app)
ENDIF
F_DeleteClass(fcc)
ELSE
WriteF('Unable to create class\n')
ENDIF
CloseLibrary(feelinbase)
ENDIF
ENDPROC
->PROC myDispatcher
F_METHOD(myDispatcher)
sys_RGlob()
SELECT method
CASE FM_DnDBegin; WriteF('DnDBegin\n')
CASE FM_DnDFinish; WriteF('DnDFinish\n')
CASE FM_DnDReport; WriteF('DnDReport\n')
CASE FM_DnDQuery; WriteF('DnDQuery\n')
CASE FM_DnDDrop; WriteF('DnDDrop\n')
ENDSELECT
ENDPROC F_SUPERDO